from run_test_v_1_1 import run1 as run_test
from evaluation_v_2_1 import run_evaluation as run_evaluation
import time
def format_time(seconds):
    """将秒数转换为 分:秒 格式"""
    minutes = int(seconds // 60)
    remaining_seconds = int(seconds % 60)
    return f"{minutes}分{remaining_seconds}秒"

if __name__=="__main__":
    start_time = time.time()
    print(f"\n\n\n-----------------------------------start run test------------------------------------------------\n\n\n")
    file_answer=run_test("聊天助手")
    end_time1 = time.time()
    total_time1 = end_time1 - start_time
    print(f"获取答案，总用时: {format_time(total_time1)}")

    print(f"\n\n\n-----------------------------------start run evaluation------------------------------------------------\n\n\n")
    run_evaluation(sheet="聊天助手",file_answer=file_answer)

    end_time2 = time.time()
    total_time2 = end_time2 - start_time

    print(f"全过程总用时: {format_time(total_time2)}")